/**
 * Created by Administrator on 2016/8/23.
 */
;(function () {

    //利用自定义组件构造左侧说明文本
    window.creatChart = function (id, option) {
    console.log(option);
        var dom = window.document.getElementById(id);
        var myChart = echarts.init(dom);
        var app = {};
        if (option && typeof option === "object") {
              myChart.setOption(option, true);
        }
        return myChart;
    }

    window.updateChart = function(chart,option){
        console.log();
        if (option && typeof option === "object") {
             chart.setOption(option, true);
        }
    }

    window.creatZhuChart = function (id, option) {
        console.log(option);
            var barDom = window.document.getElementById(id);
            var myChart = echarts.init(barDom);
            var app = {};
            if (option && typeof option === "object") {
                  myChart.setOption(option, true);
            }
            return myChart;
    }

})();
